#pragma once
#include "CircularQueue.h"
class CPacketHandler
{
public:
	CPacketHandler();
	~CPacketHandler();

private:
	HANDLE			m_ReadEventHandle;
	HANDLE			m_StartupEventHandle;
	HANDLE			m_DestroyEventHandle;
	HANDLE			m_PacketThreadHandle;

	CCircularQueue  m_PacketQueue;
	void            OnReceivedPacket();

public:
	void            SetReadEvent();
	BOOL			Begin();
	BOOL			End(VOID);

	VOID			PacketThreadCallback(VOID);
	BYTE*		    Push(VOID *object, DWORD protocol, BYTE *data, DWORD dataLength);
};

